$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.7 2015/05/20 15:32:54 ajacoutot Exp $

https://bugs.webkit.org/show_bug.cgi?id=113638
https://bugs.webkit.org/show_bug.cgi?id=129839
https://bugs.webkit.org/show_bug.cgi?id=126502
https://bugs.webkit.org/show_bug.cgi?id=128898
https://bugs.webkit.org/show_bug.cgi?id=128549
https://bugs.webkit.org/show_bug.cgi?id=129963

http://trac.webkit.org/changeset/164220

sparc defines/code was removed upstream in:
http://trac.webkit.org/changeset/159817

last chunk needed to build on ppc/sparc64, otherwise yarr jit and
assembler is enabled (because of llint cloop) but there's no asm
for those

--- Source/WTF/wtf/Platform.h.orig	Wed May 20 11:03:24 2015
+++ Source/WTF/wtf/Platform.h	Wed May 20 15:23:50 2015
@@ -71,6 +71,12 @@
 #define WTF_CPU_BIG_ENDIAN 1
 #endif
 
+/* CPU(SPARC64) - Sun Sparc64 */
+#if defined(__sparc64__)
+#define WTF_CPU_SPARC64 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
 /* CPU(IA64) - Itanium / IA-64 */
 #if defined(__ia64__)
 #define WTF_CPU_IA64 1
@@ -330,7 +336,7 @@
 
 #endif /* ARM */
 
-#if CPU(ARM) || CPU(MIPS) || CPU(SH4)
+#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC64)
 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
 #endif
 
@@ -658,7 +664,8 @@
     || CPU(S390X) \
     || CPU(MIPS64) \
     || CPU(PPC64) \
-    || CPU(PPC64LE)
+    || CPU(PPC64LE) \
+    || CPU(SPARC64)
 #define WTF_USE_JSVALUE64 1
 #else
 #define WTF_USE_JSVALUE32_64 1
@@ -725,7 +732,7 @@
    low-level interpreter. */
 #if !defined(ENABLE_LLINT) \
     && ENABLE(JIT) \
-    && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(HURD)) \
+    && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(HURD)) \
     && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(GTK)) \
     && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2) || CPU(ARM_TRADITIONAL) || CPU(ARM64) || CPU(MIPS) || CPU(SH4))
 #define ENABLE_LLINT 1
@@ -733,7 +740,7 @@
 
 #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT) && !COMPILER(MSVC)
 /* Enable the DFG JIT on X86 and X86_64. */
-#if (CPU(X86) || CPU(X86_64)) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(HURD))
+#if (CPU(X86) || CPU(X86_64)) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(HURD))
 #define ENABLE_DFG_JIT 1
 #endif
 /* Enable the DFG JIT on ARMv7.  Only tested on iOS and Qt/GTK+ Linux. */
@@ -824,7 +831,7 @@
 #define ENABLE_REGEXP_TRACING 0
 
 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
-#if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT) || ENABLE(LLINT_C_LOOP))
+#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT)
 #define ENABLE_YARR_JIT 1
 
 /* Setting this flag compares JIT results with interpreter results. */
